SANS2D
PRINT testing 4m beam stop mask
! L1=L2=4m
MASK/CLEAR
MASK/CLEAR/TIME
L/WAV 1.75 16.5 0.05/LOG
L/Q 0.004 1.0 0.08/log
!L/Q 0.003 0.3 0.002/lin
!L/Q .005, -0.06, 0.06, 0.0025, 0.15, -0.08, 1.5
L/QXY 0 0.15 .002/lin
L/EVENTSTIME 8000 100000 0.025/log
! note increase lower time limit here
!BACK/MON/TIMES 85000 98000
BACK/M2 85000 98000
!check BACK/M4
DET/REAR
GRAVITY/LEXTRA 2.0
GRAVITY/ON

MASKFILE=MASK_SANS2D_REAR_Edges_16Mar2015.xml,MASK_SANS2D_FRONT_Edges_16Mar2015.xml,MASK_SANS2D_REAR_Bottom_3_tubes_16May2014.xml,MASK_SANS2D_BOTH_Extras_24Mar2015.xml,MASK_SANS2D_beam_stop_4m_x_100mm_2July2015_medium_beamstop.xml,MASK_SANS2D_REAR_module2_tube12.xml,MASK_SANS2D_FRONT_module3_tube14_module5_tube6_tube7.xml,MASK_SANS2D_FRONT_module2_tube18.xml

mask/time 13000 15750

PRINT masking off beamstop arm 15mm wide at 20 degrees
!PRINT not masking beam stop arm, M4 out
mask/line 15 20
! increase min radius from 41 to 46 for large beam stop
L/R 3 -1 3
TUBECALIBFILE=TUBE_SANS2D_BOTH_40673_15Nov16.nxs
MON/DIRECT=DIRECT_SANS2D_REAR_34327_4m_8mm_16Feb16.txt
! use for front, this command has to come second!
MON/DIRECT/FRONT=DIRECT_SANS2D_REAR_34327_4m_8mm_16Feb16.txt
MON/TRANS/SPECTRUM=2
!TRANS/TRANSPEC=4/SHIFT=-55
TRANS/TRANSPEC=3
MON/SPECTRUM=2
FIT/TRANS/POLYNOMIAL3 1.75 16.5
!PRINT FIT/TRANS/OFF
!FIT/TRANS/OFF
!
!  QRESOL PART - PLEASE EDIT A1, A2, LCOLLIM AS REQUIRED
QRESOL/ON
QRESOL/DELTAR=8.0
QRESOL/A1=20.0
QRESOL/A2=8.0
QRESOL/LCOLLIM=4.0
QRESOL/MODERATOR=ModeratorStdDev_TS2_SANS_LETexptl_07Aug2015.txt 
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! Set scales and beam centre here
!
! 18/09/18 centre & scale from 53159 GDW20
set centre 107.4 -82.4
!
set scales 0.02404 1.0 1.0 1.0 1.0
!
! Sample position correction applied here
!
! correction to actual sample position, measured cryo at 320mm before shutter, 
! "notional sample" is 81mm before shutter (96mm before the 6mm thick sapphire window)
! DLS set up 81 - 133 =-52
! normal changer offset +53
! rotating rack 100mm before shutter = 81 - 100 = -19
! old rotating rack 131mm before shutter = 81 - 131 = -50
! linkam 42mm before shutter = 81 - 42 = 39
! foam cell 75mm before shutter 81-75= 6
! p-cell 142mm before shutter = 81 - 142 = -61
! rheometer 239mm before shutter = 81 - 239 = -158
SAMPLE/OFFSET +53
!
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
!
! Correction to SANS2D encoders in mm 
DET/CORR REAR X +2.5
! 27/3/15 use survey values REAR Z, at 4,6,8,12m is 113.7, 115.6, 116.2, 119.3mm
DET/CORR REAR Z +0.0
! 22/7/14 front X was -35.0, need check new pixel calib, x centre moved 107.2 to 102.8, shift 4.4mm (shifted front 15mm less in xls)
! but we have not checked anyway with three new adc on front det. Xc -20 seems approx OK for run 26111
! from SANS2d_survey, expect about -30 for front, +3 for rear,  note Mantid only applies XCORR difference to front det 
! 25/3/15 checks on sds peak (with new pixel calibration) suggest corr X -37.5 and rot -2.5
!DET/CORR FRONT X -40
DET/CORR FRONT X -37.5
DET/CORR FRONT Y 0.0
DET/CORR FRONT Z +81
DET/CORR FRONT ROT 0
! 11/11/14 fit to survey data gives radius to tube centres at 381.7 (instead of DT's 306)
DET/CORR FRONT RADIUS 75.7
DET/CORR FRONT SIDE 0.19
! test new tilts  2.4m -20deg from RKH's SANS2d_survey spreadsheet
DET/CORR FRONT YTILT 0.1419
DET/CORR FRONT XTILT -0.0850
!
!! 18/09/18 MASK182F Barriga, Sample Changer 2.4m & 4m A1=20,A2=8mm
